

import java.io.IOException;
import java.net.InetAddress;
import java.util.List;

public class ClientSide {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		
		int[] ports = {4001};
		String[] Ips = {"192.168.10.76"};
		
		Address a[] ={new Address(InetAddress.getLocalHost().getHostAddress(),4003),new Address(InetAddress.getLocalHost().getHostAddress(),4004)};
		System.out.println("a:"+a.length);
	
		BestEffortBroadcast beb = new BestEffortBroadcast(4003,a);
		
		
		beb.send(new Message(new String("c:testeHeader"),new String("c:testMessage")));
		System.out.println("From Servidor:"+beb.deliver().toString());
		beb.closeConection();
		/*
		System.out.println("BroadCast:");
		beb.send(3);
		/*long v = beb.deliver();
		System.out.println(v);*/
		//beb.closeConection();
		
		
		// TODO Auto-generated method stub

	}

}
